//
//  ViewController.swift
//  LoginButton
//
//  Created by linktoplinktop on 2017/3/14.
//  Copyright © 2017年 None. All rights reserved.
//

import UIKit

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        
        let btn:MyLoginBtn = MyLoginBtn.init(frame:CGRect.init(x: (320 - 160) / 2, y: 200, width: 160, height: 65))
        let tapGest:UITapGestureRecognizer = UITapGestureRecognizer.init(target: self, action: #selector(ViewController.btnFucntion(_:)));
        
        btn.addGestureRecognizer(tapGest);
        
        self.view.addSubview(btn);
        
        
        
    }

    func btnFucntion(_ sender:UITapGestureRecognizer) {
        
        let btn = sender.view as! MyLoginBtn;
        btn.startAnimate();
        
        
    }
    
    
    
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }


}

